#include "BulletData.h"




BulletData::BulletData(int id, int type, double x, double y, int direction, Rect* actor, Rect* target, BulletArmies bulletArmy, bool isHalf, int distanceForLive)
{
	this->id = id;
	this->rect = new Rect(x, y, _BULLET_1_WIDTH, _BULLET_1_HEIGHT);
	this->bulletArmy = bulletArmy;
	// set special data
	this->direction = direction;
	this->actor = actor;
	this->target = target;
	this->type = type;
	this->startX = x;
	this->startY = y;
	this->isHalf = isHalf;
	this->distanceForLive = distanceForLive;

	sprites = new Sprites(rect);
}

void BulletData::initSpriteHandler(LPD3DXSPRITE spriteHandler)
{
	sprites->initSpriteHandler(spriteHandler);
}

void BulletData::initData()
{
	this->initSprite();
}
